#ifndef FEEXPORT_H
#define FEEXPORT_H

#include <QObject>
#include <QString>
#include "opencv2/opencv.hpp"
#include <math.h>
#include <QDebug>
#include <QFile>

using namespace cv;
using namespace std;

class FEexport : public QObject {
    Q_OBJECT

public:
    FEexport(QString ProjName, QString EventName);
    int init(int inc);
    int read();
    void write();

signals:
    void status(int);
    void done();

public slots:
    void doIt();

private:
    FileStorage fs;
    QString projName;
    QString eventName;
    Mat lasers;
    Mat grid;

    float tankRadius;
    int gridX; //number of X grid spaces
    int gridY; //number of Y grid spaces
    int increments;

    FileStorage fsCam0,fsCam1;
    Mat points; //points to be read
    FileNode frames,frames1;
    FileNodeIterator it, it_begin, it_end,
                     it1, it_begin1, it_end1 ;
    int frameTotal;

    QFile outFile;

    //set the bounds for consideration
    Mat_<float> upperY, lowerY;
    Mat_<float> upperX, lowerX;

    std::vector<int> timecode;
    std::vector<int>::iterator itTimecode;
};

#endif // FEEXPORT_H
